﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="AddAd.aspx.cs" Inherits="NJL.WebManage.Ad.AddAd" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title></title>
    <script type="text/javascript" src="/ckeditor/ckeditor.js"></script>
    <script src="/Scripts/jquery-1.4.1.js" type="text/javascript"></script>
    <script type="text/javascript">
        function check() {
            var regInt = /^\d+/; //整数
            var txtID = document.getElementById("<%=txtID.ClientID %>").value;
            if (regInt.exec(txtID) == null) {
                alert("编号只能输入整数");
                return false;
            }
            var txtWidth = document.getElementById("<%=txtWidth.ClientID %>").value;
            if (regInt.exec(txtWidth) == null) {
                alert("大小只能输入整数");
                return false;
            }
            var txtHeight = document.getElementById("<%=txtHeight.ClientID %>").value;
            if (regInt.exec(txtHeight) == null) {
                alert("大小只能输入整数");
                return false;
            }
            var txtName = document.getElementById("<%=txtName.ClientID %>").value;
            if ($.trim(txtName) == "") {
                alert("请输入名称");
                return false;
            }
        }
    </script>
</head>
<body>
    <form id="form1" runat="server">
    <div class="gray_bd">
        <div class="table_title">
            广告管理-添加广告</div>
        <div class="pad5px">
            <table align="center" cellspacing="0" style="width: 100%">
                   <tr>
                    <td style="width: 120px; text-align: right;">
                        编号：</td>
                    <td>
                        <asp:TextBox ID="txtID" runat="server" Width="50px" MaxLength="8">1</asp:TextBox>
                    </td>
                    <td>
                        &nbsp;</td>
                </tr>
                   <tr>
                    <td style="width: 120px; text-align: right;">
                        操作权限：</td>
                    <td>
                        <asp:DropDownList ID="ddlType" runat="server">
                            <asp:ListItem Value="1">总站</asp:ListItem>
                            <asp:ListItem Value="2">分站</asp:ListItem>
                        </asp:DropDownList>
                    </td>
                    <td>
                        &nbsp;</td>
                </tr>
                   <tr>
                    <td style="width: 120px; text-align: right;">
                        广告位名称：</td>
                    <td>
                        <asp:TextBox ID="txtName" runat="server" MaxLength="25" Width="150px"></asp:TextBox>
                    </td>
                    <td>
                        &nbsp;</td>
                </tr>
                <tr>
                    <td style="width: 120px; text-align: right;">
                        广告位大小：
                    </td>
                    <td>
                        <asp:TextBox ID="txtWidth" runat="server" MaxLength="8" Width="50px"></asp:TextBox>
                        ×<asp:TextBox ID="txtHeight" runat="server" MaxLength="8" Width="50px"></asp:TextBox>
                    </td>
                    <td>
                        &nbsp;
                    </td>
                </tr>
                <tr>
                    <td style="width: 120px; text-align: right;">
                        广告位状态：</td>
                    <td align="left">
                        <asp:RadioButtonList ID="rblState" runat="server">
                        </asp:RadioButtonList>
                    </td>
                    <td>
                        &nbsp;</td>
                </tr>
                <tr>
                    <td>
                        &nbsp;
                    </td>
                    <td>
                        <asp:Button ID="btnSubmit" runat="server" OnClick="btnSubmit_Click" Style="height: 21px"
                            Text="提交" Width="40px" OnClientClick="return check()" />
                        &nbsp;<input id="Reset1" type="reset" value="重置" runat="server" />
                    </td>
                    <td>
                        &nbsp;
                    </td>
                </tr>
                <tr>
                    <td>
                        &nbsp;
                    </td>
                    <td>
                    </td>
                    <td>
                        &nbsp;
                    </td>
                </tr>
            </table>
        </div>
    </div>
    <%--   <script type="text/javascript">
        var control = document.getElementById("txtdefault");
        if (control != null) {
            CKEDITOR.replace('txtdefault',
                            {
                                filebrowserBrowseUrl: '/ckfinder/ckfinder.html', //启用浏览功能
                                filebrowserImageBrowseUrl: '/ckfinder/ckfinder.html?Type=Images',
                                filebrowserFlashBrowseUrl: '/ckfinder/ckfinder.html?Type=Flash',
                                filebrowserUploadUrl: '/ckfinder/core/connector/aspx/connector.aspx?command=QuickUpload&type=Files',
                                filebrowserImageUploadUrl: '/ckfinder/core/connector/aspx/connector.aspx?command=QuickUpload&type=Images',
                                filebrowserFlashUploadUrl: '/ckfinder/core/connector/aspx/connector.aspx?command=QuickUpload&type=Flash'
                            }
                            );
        }
       for(var i=0;i<<%=Count %>;i++)
        { 
        if(document.getElementById("txt"+i)!=null)
        {
          CKEDITOR.replace('txt'+i,
                            {
                                filebrowserBrowseUrl: '/ckfinder/ckfinder.html', //启用浏览功能
                                filebrowserImageBrowseUrl: '/ckfinder/ckfinder.html?Type=Images',
                                filebrowserFlashBrowseUrl: '/ckfinder/ckfinder.html?Type=Flash',
                                filebrowserUploadUrl: '/ckfinder/core/connector/aspx/connector.aspx?command=QuickUpload&type=Files',
                                filebrowserImageUploadUrl: '/ckfinder/core/connector/aspx/connector.aspx?command=QuickUpload&type=Images',
                                filebrowserFlashUploadUrl: '/ckfinder/core/connector/aspx/connector.aspx?command=QuickUpload&type=Flash'
                            }
                            );
                            }
        }
    </script>--%>
    </form>
</body>
</html>
